package com.boot.unity.api.modules.train.dao;

import com.boot.unity.api.modules.train.entity.Dept;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface DeptDao {

    @Select("select * from litemall_dept where id = #{id}")
    Dept queryEntityById(@Param("id") int id);

    @Update("update litemall_dept set authorization = authorization - 1 where id = #{id}")
    int updateAuthorization(@Param("id") int id);
}
